package com.tetris.project;

import android.content.Context;
import android.util.Log;

class TThread extends Thread{
	
	private final Context myContext;
	private boolean done = false;
	Music bgMusic;
	
	TThread(Context context){
		this.myContext = context;
	}
	
	@Override
	public void run(){
		bgMusic = new Music(myContext);
		bgMusic.play(R.raw.main);
		Log.d(Shr_Res.TAG, "thread music.play");
	}
	
	public void requestExitAndWait(){
		bgMusic.stop();
		Log.d(Shr_Res.TAG, "thread music.stop");
		try{
			join();
		} catch (InterruptedException ex) {
			//Ignore
		}
	}
}

